import { request, config ,ecityTable} from 'utils'

const { api } = config
const { query } = ecityTable
const {
  MaintenanceIndicators,
  MaintenanceAnalysis,
  MaintenanceStatistics,
  ScadeStationList,
  ECityMonitorMetas,
} = api

export function queryIndicators(params) {
  return request({ url: MaintenanceIndicators, params})
}

export function queryAnalysis(params) {
  return request({ url:MaintenanceAnalysis, params })
}

export function queryStatistics(params) {
  return request({ url:MaintenanceStatistics, params })
}


export function queryScadeStation(data) {
  return request({ url: ScadeStationList, data, method: 'post' })
}

export function queryMonitorMetas(params) {
  const { payload: data, tablename } = params;
  return query({ url: ECityMonitorMetas, data }, tablename)
}
